package cn.iocoder.yudao.module.eval.dal.mysql.filingoccupation;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.eval.dal.dataobject.filingoccupation.FilingOccupationDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.eval.controller.admin.filingoccupation.vo.*;

/**
 * 申请开展评价的职业（工种）关联 Mapper
 *
 * @author 龙头企业
 */
@Mapper
public interface FilingOccupationMapper extends BaseMapperX<FilingOccupationDO> {

    default PageResult<FilingOccupationDO> selectPage(FilingOccupationPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<FilingOccupationDO>()
                .eqIfPresent(FilingOccupationDO::getFilingCreationId, reqVO.getFilingCreationId())
                .eqIfPresent(FilingOccupationDO::getOccupationCode, reqVO.getOccupationCode())
                .likeIfPresent(FilingOccupationDO::getOccupationName, reqVO.getOccupationName())
                .likeIfPresent(FilingOccupationDO::getWorkTypeName, reqVO.getWorkTypeName())
                .eqIfPresent(FilingOccupationDO::getWorkTypeLevel, reqVO.getWorkTypeLevel())
                .eqIfPresent(FilingOccupationDO::getRecognitionBasis, reqVO.getRecognitionBasis())
                .betweenIfPresent(FilingOccupationDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(FilingOccupationDO::getId));
    }

}